Mobile HTML5 by Estelle Weyl

Mobile HTML5 by Estelle Weyl

Author:Estelle Weyl
Language: eng
Format: epub, pdf
ISBN: 9781449311407
Publisher: O’Reilly Media
Published: 2013-11-13T05:00:00+00:00


article ul li:last-of-type { border-bottom: none; }

With this structural pseudoclass, we don’t need to know which language is last, nor do we need to add a class to the last element. Instead, we use the current document structure to target an element based on that structure. We used :last-of-type, but since only <li>s can be direct children of <ul>s, we could have also targeted this element using :last-child, :nth-last-of-type(1), or :nth-last-child(1).

Note that using :first-of-type is more performant than using :last-of-type. We could have, and probably should have, included border-top on our language list items, and then written:



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.